import {setServer} from "@/utils/axios";
import {chargeUrl} from "../../../url";
const chargeRequest = setServer(chargeUrl);

// 查询充电桩指令
export function getInstruct(query) {
  return chargeRequest({
    url: '/instruct/',
    method: 'get',
    params: query
  })
}

// 充电桩指令详情
export function getInstructDetail(id) {
  return chargeRequest({
    url: '/instruct/'+id,
    method: 'get',
  })
}

// 新增充电桩指令
export function addInstruct(query) {
  return chargeRequest({
    url: '/instruct/',
    method: 'post',
    data: query
  })
}

// 修改充电桩指令
export function updateInstruct(query) {
  return chargeRequest({
    url: '/instruct/',
    method: 'put',
    data: query
  })
}

// 删除充电桩指令
export function deleteInstruct(id) {
  return chargeRequest({
    url: '/instruct/'+id,
    method: 'delete',
  })
}
